#include"RBTree.h"
namespace mzt
{
	template <class k>
	class Set
	{
		struct set_compare
		{
			const k& operator()(const k& key)
			{
				return key;
			}
		};
	public:
		typedef typename RBTree<k, k, set_compare>::iterator iterator;
		typedef typename RBTree<k, pair<k, k>, set_compare>::reverse_iterator reverse_iterator;

		reverse_iterator rbegin() { return _root.rbegin(); }
		reverse_iterator rend() { return _root.rend(); }

		iterator begin()  {return _root.begin();}
		iterator end()    {return _root.end();  }
		bool insert(const k& kv)
		{
			_root.Insert(kv);
			return true;
		}
	private:
		RBTree<k, k, set_compare> _root;
	};
}
